package com.my.study.zookeeper_study;

import org.apache.zookeeper.AsyncCallback;

/**
 * @author zlx
 * @Description 异步创建zk结点回调函数
 * @Date 2020-08-19
 * @Param
 * @return
 **/
class MyStringCallBack implements AsyncCallback.StringCallback{

    /**
     * @param rc 返回码 0-成功；-4客户端和服务端连接已断开； -110指定结点已存在；  -112会话已过期
     * @param path
     * @param ctx
     * @param name
     **/
    @Override
    public void processResult(int rc, String path, Object ctx, String name) {

        System.out.println("create path result is: " + "rc: " + rc + " path: "+ path + ", ctx: " + ctx + ", real pathName is:" + name);
    }
}
